package cn.shopifymall.log4j;

import org.apache.log4j.Logger;
import org.apache.log4j.xml.DOMConfigurator;

/**
 * @Author 孤风雪影
 * @Email gitee.com/efairy520
 * @Date 2025/4/18 2:15
 * @Version 1.0
 */
public class Log4jWithXml {

    private static final Logger logger = Logger.getLogger(Log4jWithXml.class);

    public static void main(String[] args) {
        DOMConfigurator.configure(ClassLoader.getSystemResource("log4j.xml"));
        for (int i = 0; i < 5000; i++) {
            logger.trace("跟踪信息");
            logger.debug("调试信息");
            logger.info("输出信息");
            logger.warn("警告信息");
            logger.error("错误信息");
            logger.fatal("致命信息");
        }
    }
}
